set -e
rm -rf ./out ./bin
docker run --rm -ti \
  -e HARDWARE=ipcamera_hi3516dv300 \
  -v ${PWD}/out:/OpenHarmony/out \
  -v ${PWD}:/OpenHarmony/applications/sample/camera/app \
  ystyle/open-harmony
mkdir -p ./bin
cp ./out/ipcamera_hi3516dv300/bin/camera_app ./bin/lua
tar -zcf lua-5.4.2-ohos.tar.gz ./bin
echo 'build success!'